import request from '@/utils/request'

// 查询商品规格列表
export function listUnitsKey(query) {
  return request({
    url: '/goods/unitsKey/list',
    method: 'get',
    params: query
  })
}

// 查询商品规格列表
export function unitsKeyValueList(query) {
  return request({
    url: '/goods/unitsKey/unitsKeyValueList',
    method: 'get',
    params: query
  })
}

// 查询商品规格详细
export function getUnitsKey(id) {
  return request({
    url: '/goods/unitsKey/' + id,
    method: 'get'
  })
}

// 新增商品规格
export function addUnitsKey(data) {
  return request({
    url: '/goods/unitsKey',
    method: 'post',
    data: data
  })
}

// 修改商品规格
export function updateUnitsKey(data) {
  return request({
    url: '/goods/unitsKey',
    method: 'put',
    data: data
  })
}

// 删除商品规格
export function delUnitsKey(id) {
  return request({
    url: '/goods/unitsKey/' + id,
    method: 'delete'
  })
}

// 导出商品规格
export function exportUnitsKey(query) {
  return request({
    url: '/goods/unitsKey/export',
    method: 'get',
    params: query
  })
}
